package request

import (
	"gitee.com/cjsn/topsdk/util"
)

type AlibabaServicecenterWorkcardEvaluateRequest struct {
	/*
	   工单ID     */
	WorkcardId *int64 `json:"workcard_id" required:"true" `
	/*
	   鉴定结果图片列表     */
	PicUrlList *[]string `json:"pic_url_list,omitempty" required:"false" `
	/*
	   是否鉴定通过     */
	PassEvaluation *bool `json:"pass_evaluation" required:"true" `
	/*
	   鉴定不通过时的原因编码     */
	FailReason *string `json:"fail_reason,omitempty" required:"false" `
	/*
	   扩展参数，品牌回传鉴定附加信息     */
	ExtendInfo *string `json:"extend_info,omitempty" required:"false" `
}

func (s *AlibabaServicecenterWorkcardEvaluateRequest) SetWorkcardId(v int64) *AlibabaServicecenterWorkcardEvaluateRequest {
	s.WorkcardId = &v
	return s
}
func (s *AlibabaServicecenterWorkcardEvaluateRequest) SetPicUrlList(v []string) *AlibabaServicecenterWorkcardEvaluateRequest {
	s.PicUrlList = &v
	return s
}
func (s *AlibabaServicecenterWorkcardEvaluateRequest) SetPassEvaluation(v bool) *AlibabaServicecenterWorkcardEvaluateRequest {
	s.PassEvaluation = &v
	return s
}
func (s *AlibabaServicecenterWorkcardEvaluateRequest) SetFailReason(v string) *AlibabaServicecenterWorkcardEvaluateRequest {
	s.FailReason = &v
	return s
}
func (s *AlibabaServicecenterWorkcardEvaluateRequest) SetExtendInfo(v string) *AlibabaServicecenterWorkcardEvaluateRequest {
	s.ExtendInfo = &v
	return s
}

func (req *AlibabaServicecenterWorkcardEvaluateRequest) ToMap() map[string]interface{} {
	paramMap := make(map[string]interface{})
	if req.WorkcardId != nil {
		paramMap["workcard_id"] = *req.WorkcardId
	}
	if req.PicUrlList != nil {
		paramMap["pic_url_list"] = util.ConvertBasicList(*req.PicUrlList)
	}
	if req.PassEvaluation != nil {
		paramMap["pass_evaluation"] = *req.PassEvaluation
	}
	if req.FailReason != nil {
		paramMap["fail_reason"] = *req.FailReason
	}
	if req.ExtendInfo != nil {
		paramMap["extend_info"] = *req.ExtendInfo
	}
	return paramMap
}

func (req *AlibabaServicecenterWorkcardEvaluateRequest) ToFileMap() map[string]interface{} {
	fileMap := make(map[string]interface{})
	return fileMap
}
